package com.dacel.ergraph.model;

import java.io.Serializable;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;


@Entity
@Table(name = "CATEGORY")
@SequenceGenerator(
    name="SEQ_CATEGORY",
    sequenceName="my_sequence"
)
public class Category implements Serializable {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = -4132328395878744903L;

	private int categoryId;
	
	private String libelle;
	
	public Category() {	
	}
	
	@Id
	@Column(name = "CATEGORY_ID")
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="SEQ_CATEGORY")
	public int getCategoryId() {
		return categoryId;
	}
	
	public void setCategoryId(int categoryId) {
		this.categoryId = categoryId;
	}

	@Basic
	@Column(name = "LIBELLE", nullable = false, length=255)
	public String getLibelle() {
		return libelle;
	}

	public void setLibelle(String libelle) {
		this.libelle = libelle;
	}
}
